﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace hello_accinv
{
    public partial class ManageUser : Form
    {
        public ManageUser()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (button1.Text == "Edit User")
            {
                button1.Text = "Confirm";
            }
            else
            {
                button1.Text = "Edit User";
            }

        }

        //private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        //{
        //    if(comboBox1.SelectedIndex == 0)
        //    {
        //        chkboxAddInto.Enabled = true;
        //        chkboxAddNew.Enabled = true;
        //        chkboxAddUser.Enabled = true;
        //        chkboxChangePos.Enabled = true;
        //        chkboxDelProduct.Enabled = true;
        //        chkboxDelUser.Enabled = true;
        //        chkboxEditProduct.Enabled = true;
        //        chkboxEditProfile.Enabled = true;
        //        chkboxManageCat.Enabled = true;
        //        chkboxPermiss.Enabled = false;
        //        chkboxProductReport.Enabled = true;
        //        chkboxSaleProduct.Enabled = true;
        //        chkboxSaleReport.Enabled = true;
        //        chkboxViewLog.Enabled = true;
        //    }
        //    else if (comboBox1.SelectedIndex == 1)
        //    {
        //        chkboxAddInto.Enabled = true;
        //        chkboxAddNew.Enabled = true;
        //        chkboxAddUser.Enabled = false;
        //        chkboxChangePos.Enabled = false;
        //        chkboxDelProduct.Enabled = true;
        //        chkboxDelUser.Enabled = false;
        //        chkboxEditProduct.Enabled = true;
        //        chkboxEditProfile.Enabled = true;
        //        chkboxManageCat.Enabled = true;
        //        chkboxPermiss.Enabled = false;
        //        chkboxProductReport.Enabled = true;
        //        chkboxSaleProduct.Enabled = true;
        //        chkboxSaleReport.Enabled = true;
        //        chkboxViewLog.Enabled = true;
        //    }
        //    else if (comboBox1.SelectedIndex == 2)
        //    {
        //        chkboxAddInto.Enabled = false;
        //        chkboxAddNew.Enabled = false;
        //        chkboxAddUser.Enabled = false;
        //        chkboxChangePos.Enabled = false;
        //        chkboxDelProduct.Enabled = false;
        //        chkboxDelUser.Enabled = false;
        //        chkboxEditProduct.Enabled = false;
        //        chkboxEditProfile.Enabled = false;
        //        chkboxManageCat.Enabled = false;
        //        chkboxPermiss.Enabled = false;
        //        chkboxProductReport.Enabled = true;
        //        chkboxSaleProduct.Enabled = true;
        //        chkboxSaleReport.Enabled = true;
        //        chkboxViewLog.Enabled = true;
        //    }

            
        //}

        private void toolStripAddNewUser_Click(object sender, EventArgs e)
        {
            if (!treeView1.SelectedNode.IsSelected)
            {
                MessageBox.Show("Select user type to add");
            }
            else
            {
                AddNewUser();
            }
        }

        private void AddNewUser()
        {
            //..
        }
    }
}
